package com.vfa.vocaburay;

import java.util.ArrayList;

public class TestQuestion {
	static int ID = 0;
	private int mId;
	private String question;
	private String dapAnA;
	private String dapAnB;
	private String dapAnC;
	private String dapAnD;
	
	public static ArrayList<TestQuestion> mCauhoi;
	
	public TestQuestion(String question, String dapAnA, String dapAnB, String dapAnC, String dapAnD){
		super();
		ID++;
		mId = ID;
		this.question = question;
		this.dapAnA = dapAnA;
		this.dapAnB = dapAnB;
		this.dapAnC = dapAnC;
		this.dapAnD = dapAnD;
		if(mCauhoi == null) mCauhoi = new ArrayList<TestQuestion>();
		mCauhoi.add(this);
	}
	
	

	
	public int getmId() {
		return mId;
	}




	public void setmId(int mId) {
		this.mId = mId;
	}




	public String getQuestion() {
		return question;
	}


	public void setQuestion(String question) {
		this.question = question;
	}


	public String getDapAnA() {
		return dapAnA;
	}

	public void setDapAnA(String dapAnA) {
		this.dapAnA = dapAnA;
	}

	public String getDapAnB() {
		return dapAnB;
	}

	public void setDapAnB(String dapAnB) {
		this.dapAnB = dapAnB;
	}

	public String getDapAnC() {
		return dapAnC;
	}

	public void setDapAnC(String dapAnC) {
		this.dapAnC = dapAnC;
	}

	public String getDapAnD() {
		return dapAnD;
	}

	public void setDapAnD(String dapAnD) {
		this.dapAnD = dapAnD;
	}
	
	
	public static ArrayList<TestQuestion> DanhsachCauhoi(){
		if(mCauhoi == null){
			new TestQuestion("Q1. Fred was a really silly boy when we were in high-school. I still remember ________ very stupid questions. " 
					, "his asking", "him to ask", "asking him", "his being asked");	
			new TestQuestion("Q2. I don't now.....people?" , "this", "those", "them", "that");
			new TestQuestion("Q3. Fred was a really silly boy when we were in high-school. I still remember ________ very stupid questions. " 
					, "his asking", "him to ask", "asking him", "his being asked");	
			new TestQuestion("Q4. I don't now.....people?" , "this", "those", "them", "that");
			new TestQuestion("Q5. Fred was a really silly boy when we were in high-school. I still remember ________ very stupid questions. " 
					, "his asking", "him to ask", "asking him", "his being asked");	
	}
		return mCauhoi;
	
	}
	
	public static TestQuestion getCauhoi(int pId){
		for(int i = 0; i<mCauhoi.size(); i++){
			if(mCauhoi.get(i).getmId() == pId)
				return mCauhoi.get(i);
		}
		return null;
	}
}
